We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 5 |
Paths | 5 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | /* |
||
15 | fromRaw: function(rawData, model) { |
||
16 | if (!_.isUndefined(model.get('discount.type'))) { |
||
17 | let discountType = model.get('discount.type'); |
||
18 | |||
19 | if ('money' === discountType.toLowerCase()) { |
||
20 | let discountAmount = parseInt(model.get('discount.valueMoney.value'), 10); |
||
21 | |||
22 | if (discountAmount > 0) { |
||
23 | return Accounting.formatMoney(discountAmount / 100, model.get('client').currency); |
||
24 | } |
||
25 | |||
26 | return ''; |
||
27 | } |
||
28 | |||
29 | let discountPercentage = model.get('discount.valuePercentage'); |
||
30 | |||
31 | if (parseInt(discountPercentage, 10) > 0) { |
||
32 | return discountPercentage + '%'; |
||
33 | } |
||
34 | } |
||
35 | }, |
||
36 | toRaw: function(formattedData, model) { |
||
41 |